package desktop.playerguide.scoreForm;

import pulpcore.image.CoreImage;
import pulpcore.sprite.Group;
import pulpcore.sprite.ImageSprite;
import pulpcore.sprite.Label;
import pulpcore.sprite.StretchableSprite;

public class ScoreGroup extends Group {
	double myScore = 0.0;
	double w;
	double h;
	Label title;
	CoreImage coreImage;
	StretchableSprite background ;
	
	
	public ScoreGroup() {
		w = 140;
		h = 160;
		background = new StretchableSprite("border.9.png", 0, 0, w, h);
		width.set(w);
		height.set(h);
		background.alpha.set(40);
		add(background);
		title = new Label("score: %.1f ", 10, 130);
		title.setFormatArg(myScore);
        add(title);
        coreImage = CoreImage.load("nogo.jpg");
        ImageSprite is = new ImageSprite(coreImage,20.0,20.0,100.0,100.0);
        add(is);
	}
	
	public double getW(){
		return w;
	}
	
	public double getH(){
		return h;
	}
	
	public void setScore(double score){
		myScore = score;
	}
	
	@Override
	public void update(int elapsedTime) {
		super.update(elapsedTime);
//		myScore;
		title.setFormatArg(myScore);
	}
	
}
